home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
bufinfo.arc
/
BUFFERS.TXT
Wrap
Text File
|
1987-03-01
|
6KB
|
170 lines
Filename: BUFFERS.TXT
Date: 1-Mar-87
A brief discussion of the DOS buffers command,
of particular interest to BBS SysOps
Author: Mike Davidson
Organization: Intermountain Softworks
P. O. Box 2043
Walla Walla, WA 99362
This document is placed in the PUBLIC DOMAIN. In that spirit,
readers are encouraged to add substantive comments on the same
subject. The suggested form is...
Name: Subject:
Organization: Date:
Comment:
BBS developers and "door" applications programmers are, of course,
welcome to use any portion of this file within distributed
documentation.
Readers are further cordially invited to visit our own PCBoard system
at 509/529-7229. Our maximum bit rate is 2400. We operate 24 hours
on weekends, and between 1600h and 0600h weekdays, Pacific.
Weekdays, the system is subject to availability after midnight.
BUFFERS.TXT - A brief discussion of disk buffers
Most operators of computer bulletin board systems are oriented
toward the technical. This is fortunate, although we have not been
able to determine if the trait is inherited or a learned necessity.
In the case of a CONFIG.SYS file which tells DOS to trust one's
judgment in a few matters, rather than reverting to defaults, most of
us have safely specified FILES to equal some number, asked that DOS
install a RAMdisk, and have loaded the ANSI driver.
The BUFFERS command, however, may be an entirely different
matter. To be sure, the DOS Reference Manual provides a couple of
strong hints that a BUFFERS default of two may not be adequate, but
hints are often not enough.
In our case, an even stronger hint came in a message from a
Chicago SysOp. "What did you do to Tradewars? It sure is slow!" At
the time, we were still running CPC14.1D of RBBS-PC, and the
"doorware" application TRADEWARS was in the RBBS default directory,
per the author's instructions. Indeed, that was the only place it
could be. And that, in retrospect, was a worst-case scenario.
This particular subdirectory may have had some 300 files.
TRADEWARS was near the bottom of the directory, and was disk-
intensive, almost continuously reading from or writing to our hard
disk. This is not to suggest that TW doesn't frequently access the
disk even under optimum circumstances, but performance may be
substantially improved, as we shall see.
Moreover, doorware author Bob Westcott reminds callers, in a
message sent out over the modem, that return to RBBS may take "20 -
30 seconds." And it did. But Seagate proclaims that our drive's
data transfer rate is on the order of five megabits per second!
Conclusion: BUFFERS!
Common sense may suggest that the operating system simply reads
information from a disk and passes it directly to an application.
This is not the case. An interim holding area, called a disk buffer,
gets it first. A disk buffer is a 512-byte block of memory that DOS
uses to temporarily hold information it is reading from, or writing
to, a disk.
- 2 -
BUFFERS.TXT - A brief discussion of disk buffers
If the buffered data will be used repeatedly, access time will
be improved significantly if DOS does not have to reread the same
data each time it is needed. Users are given the responsibility of
telling DOS how many 512-byte disk buffers to allocate. This is done
within CONFIG.SYS, and uses the syntax...
BUFFERS = nn
where nn is an integer between 1 and 99. Each buffer requested will
increase the resident size of DOS by 528 bytes.
Some simple algorithm could doubtless be written to suggest the
optimum number of buffers for a particular configuration. For a 20-
megabyte hard disk, with the number of subdirectories that PCBoard
requires, the magic number, we believe, is between 15 and 25. The
ultimate authority may be a stopwatch. 15 will astound you if you've
accepted the DOS default of 2; indeed, PCBoard subdirectory searches
will appear almost instantaneous.
As to TRADEWARS, we had occasion to code a short program in
assembler (CONDORxx.ARC, available on many PCBoard systems or from
us) for use with PCBoard 11.7D/E. CONDOR thoroughly convinces
doorware applications they are running under RBBS-PC. From the
moment CONDOR writes the RBBS-PC messages file, load and
initialization of TRADEWARS now requires less than five seconds. A
miracle? Hardly. DOS can do almost anything if given half a chance.
- 3 -